package com.eminem.filechar;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;

public class FileReaderAndWriterTest1 {

	public static void main(String[] args) throws Exception {
		FileReader fr = new FileReader(new File("c:/a.txt"));
		BufferedReader br = new BufferedReader(fr);
		
		FileWriter fw = new FileWriter(new File("c:/b.txt"));
		BufferedWriter bw = new BufferedWriter(fw);
		
		String str;
		while(null != (str = br.readLine())){
			bw.write(str);
			bw.newLine();
		}
		
		bw.close();
		br.close();
	}
}
